<style>

.coefficient span.error {
    position: absolute !important;
    left:150px;
}

#coefficientsTBody tr td div {
    height: 29px;
    padding-top: 3px;
}

.quantityError{
    border-color:#e9573f;
}
#coefficientsTable .selected input.textInput{
    background:#d2eafa !important;
}
 
</style>
<link href="${rc.getContextPath()}/manage/css/dwzCustomCss/dwz.custom.css?v=${ver}" rel="stylesheet" type="text/css">
<form method="post" action="${rc.getContextPath()}/manage/standardCapacity/saveStandardCapacity" class="pageForm required-validate" onsubmit="return coefficientJs._tsubmit(this);">
    <div class="pageContent">
        <div class="pageFormContent">
        <input type="hidden" name="navTabId" value="${navTabId!''}">
        <input type="hidden" name="id" value="<#if (standardCapacity.workCenterCode)??>${standardCapacity.workCenterCode!''}</#if>">
        <fieldSet>
            <dl>
                <dt><@label key="workCenter.C,colon">工作中心：</@label></dt>
                <#if (standardCapacity.workCenterCode)??>
                <dd>
                    <input type="text" id="workCenterGrp.workCenterCode" name="workCenterCode" value="${standardCapacity.workCenterCode!''}" readonly="readonly" /> 
                </dd>
                <#else>
                <dd>
                    <input type="text" id="workCenterGrp.workCenterCode" name="workCenterCode" value="${standardCapacity.workCenterCode!''}"postField="workCenterCode" suggestFields="workCenterCode,workCenterText" 
                    suggestUrl="${rc.getContextPath()}/manage/workCenter/workCenterSuggest" warn="<@label key='workCenterNotExitstOrLocked.M'>工作中心不存在或已被使用</@label>"
                    remote="${rc.getContextPath()}/manage/workCenter/validateWorkCenter"  lookupGroup="workCenterGrp" class="required textInput"/>
                </dd>
                </#if>
            </dl>
            <dl>
                <dt><@label key="workCenterDescription.C,colon">工作中心描述：</@label></dt>
                <dd>
                    <input type="text" id="workCenterGrp.workCenterText" name="workCenterText" value="${standardCapacity.workCenterText!''}" readonly="readonly"/>
                </dd>
            </dl>
            <dl>
            <dt><@label key='materialCode.C,colon'>物料编号：</@label></dt>
            <#if (standardCapacity.workCenterCode)??>
            <dd>
                <input class="required" id="materialLookup.materialCode" name="materialCode" value="${standardCapacity.materialCode!''}" type="text" readonly="readonly" />
            </dd>
            <#else>
            <dd>
                <input class="required look" id="materialLookup.materialCode" name="materialCode" value="${standardCapacity.materialCode!''}" type="text" postField="materialCode" suggestFields="materialCode,materialText" 
                suggestUrl="${rc.getContextPath()}/manage/material/componentSuggest" lookupGroup="materialLookup" callback="setProcessOperationData"/>
                <a class="btnLook" href="${rc.getContextPath()}/manage/material/componentLookUp?lookupType=radio" rel="materialLookup_dialog" title="<@label key='select.C,materialCode.C'>选择物料</@label>" callback="setProcessOperationData" lookupGroup="materialLookup" ></a>
            </dd>
            </#if>
            </dl>
            <dl>
                <dt><@label key='materialText.C,colon'>物料名称：</@label></dt>
                <dd><input id="materialLookup.materialText" name="materialText" value="${standardCapacity.materialText!''}" type="text" readonly="readonly"/></dd>
            </dl>
            <dl>
                <dt><@label key="standardCapacity.C,colon">标准产能</@label></dt>
                <dd>
                    <input type="text" name="standardCapacity" value="${standardCapacity.standardCapacity!''}" class="required digits" min="0" maxlength="9"readonly="readonly"/>
                </dd>
            </dl>
            <dl>
                <dt><@label key="standardHours.C,colon">标准用时(小时)</@label></dt>
                <dd>
                    <input type="text" name="standardHours" value="${standardCapacity.standardHours!''}" class="required digits" min="0" maxlength="9"readonly="readonly"/>
                </dd>
            </dl>
        </fieldSet>
        <div class="panel" style="width:100%;margin:0 0 5px 0;">
                <h1><@label key="capacityCoefficient.C">产能系数</@label></h1>
                    <div>
                        <table id="coefficientsTable" class="table border canopration" width="100%" layoutH="310">
                            <thead>
                                <tr class="theadTr">
                                    <th width="30"><input group="ids" type="checkbox" class="checkboxCtrl"></th>
                                    <th width="100"><@label key="lowerQuantity.C">下限量</@label></th>
                                    <th width="100"><@label key="upperQuantity.C">上限量</@label></th>
                                    <th width="100"><@label key="capacityCoefficient.C">产能系数</@label></th>
                                </tr>
                            </thead>
                            <tbody id="coefficientsTBody">
                                <#if standardCapacity.coefficients?? && (standardCapacity.coefficients?size>0)>
                                <#list standardCapacity.coefficients as capacityCoefficient>
                                <tr>
                                    <td width="30"><input  name="ids" type="checkbox" class="checkboxCtrl"></td>
                                    <td width="100" class="coefficient">${capacityCoefficient.lowerQuantity!''}</td>
                                    <td width="100" class="coefficient">${capacityCoefficient.upperQuantity!''}</td>
                                    <td width="100" class="coefficient required">${capacityCoefficient.coefficient!''}</td>
                                </tr>
                                </#list>
                            </#if>
                            </tbody>
                        </table>
                    </div>
            </div> 
        </div>
    <#if standardCapacity??>
            <#assign createInfo=standardCapacity>
            <#include "/common/createInfo.html">
    </#if>
    <div class="formBar">
            <ul>
                <li>
                    <div class="buttonActive">
                        <div class="buttonContent">
                            <button type="button" class="close">
                                    <@label key="close.B">关闭</@label>
                            </button>
                        </div>
                    </div>
                </li>
            </ul>
    </div>
            
            